<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/view/common/header-talent.jsp"%>
<center>
	<h2>求职个人中心</h2>
</center>
<hr>
<table class="table table-hover">
	<caption>
		<h3>一、简历管理</h3>
		<span class="pull-right"><a
			href="<%=request.getContextPath()%>/view/talent/resume-add.jsp">添加简历</a></span>
	</caption>
	<tr>
		<th>序 号</th>
		<th>求职意向</th>
		<th>工作经历</th>
		<th>项目经验</th>
		<th>操 作</th>
	</tr>
	<c:forEach items="${resumeList }" var="resume" varStatus="v">
		<tr>
			<td>${v.count }</td>
			<td>${resume.intention }</td>
			<td>${resume.workExperience }</td>
			<td>${resume.projectExperience }</td>
			<td><a href="javascript:resumeDelete(${resume.id });">删除</a> | <a
				href="<%=request.getContextPath() %>/ResumeServlet?command=preUpdate&resumeId=${resume.id }" >修改</a></td>
		</tr>
	</c:forEach>
</table>
<table class="table table-hover">
	<caption>
		<h3>二、结果查询</h3>
	</caption>
	<tr>
		<th>序 号</th>
		<th>职位名称</th>
		<th>所属企业</th>
		<th>申请状态</th>
		<th>申请时间</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${applicationList }" var="application" varStatus="v">
		<tr>
			<td>${v.count }</td>
			<td>${application.positionName }</td>
			<td>${application.companyName }</td>
			<td>${application.status }</td>
			<td><fmt:formatDate pattern="yy-MM-dd HH:mm:ss" value="${application.appTime }"/></td>
			<td><a href="javascript:applicationDelete(${application.id });">删除</a>
		</tr>
	</c:forEach>
</table>
<script>
	function resumeDelete(resumeId) {
		layer.confirm('确认删除？', {
			btn: ['确认！','取消！'] //按钮
		}, function(){
		    location= '<%=request.getContextPath()%>/ResumeServlet?command=deleteResume&resumeId='
									+ resumeId;
						});
	}
	
	function applicationDelete(applicationId) {
		layer.confirm('确认删除？', {
			btn: ['确认！','取消！'] //按钮
		}, function(){
		    location= '<%=request.getContextPath()%>/ApplicationServlet?command=deleteApplication&applicationId='
									+ applicationId;
						});
	}


</script>
</body>
</html>